<?php namespace App\Services\User;

class ReceiveMessageService{

	public function receiveMessage($data){

		$toOpenId = $data['openid'];

		$message = $data['message'];

		$wechat =app('wechat');

		try {
			$wechat->staff->message($message)->to($toOpenId)->send();
		} catch (Exception $e) {
			throw new WeChatException();
		}
	}

}